<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>topic</title>
</head>
<body>
    {% extends 'learning_logsss/base.html' %}
    {% block header %}
      <h2>{{ topic }}</h2>
    {% endblock header %}

    {% block content %}
        <p>
            <a href="{% url 'learning_logsss:new_entry' topic.id %}">添加新笔记</a>
        </p>

        {% for entry in entries %}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3>
                        {{ entry.date_added|date:'M d,Y H:i' }}
                        <small>
                            <a href="{% url 'learning_logsss:edit_entry' entry.id %}">编辑内容</a>
                        </small>
                    </h3>
                </div>
                <div class="panel-body">
                    {{ entry.text|linebreaks }}
                </div>

            </div>
        {% empty %}
            此主题还未曾添加笔记
        {% endfor %}
    {% endblock %}
</body>
</html>